#ifndef FTKBUTTON_H
#define FTKBUTTON_H

#include <QPushButton>
#include "widgettree.h"
#include "ftk_xul.h"

class FtkButton : public QPushButton
{
    friend class FtkXul;

    Q_OBJECT
public:
    explicit FtkButton(WidgetTree *tree, QDomElement &element, QTreeWidgetItem *item, QWidget *parent = 0);
    QString selectStyleSheet;
    QString normalStyleSheet;
    ~FtkButton();

protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void paintEvent(QPaintEvent *event);

private:
    QPoint dragPosition;
    WidgetTree *tree;
    QTreeWidgetItem *item;
    QDomElement element;
    QRect resizeHandle() const;
    bool changeSize;

signals:

public slots:

};

#endif // FTKBUTTON_H
